#ifndef LOGGER_HPP
#define LOGGER_HPP

#include <iostream>
#include <sstream>

#include <girlTools/girlToolsImage.hpp>
#include <girlTools/girlToolsJpgCodec.hpp>

class Logger
{
public :
        Logger()
            : isActive(false)
        {}
        void log(const std::string &message)
        {
            if(isActive)
                std::cout << message << std::endl;
        }
        void log(const girl::tools::Image &image, const std::string &image_name)
        {
            if(isActive)
            {

                std::cout << "Size : " << image.width() << " x " << image.height() << std::endl;

                girl::tools::JpgCodec codec;
                std::stringstream stream;
                stream << image_name << ".jpg" ;
                std::string str;
                stream >> str;
                codec.save(str,image);
            }
        }
        void pause()
        {
            if(isActive){
                std::cout << "click on anny key" << std::endl;
                int a;
                std::cin >> a;
            }
        }

    private :
            bool isActive;
};

#endif // LOGGER_HPP
